package com.cskaoyan.servlet;

import com.cskaoyan.service.OrderService;
import com.cskaoyan.service.OrderServiceImpl;
import com.cskaoyan.service.UserService;
import com.cskaoyan.service.UserServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author stone
 * @date 2022/03/18 20:34
 */
@WebServlet("/category/*")
public class CategoryServlet extends HttpServlet {

    UserService userService = new UserServiceImpl();
    OrderService orderService = new OrderServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().append("hello category:" + userService.toString());
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}
